package com.yoda.youdianda.exception;

import com.yoda.youdianda.common.ErrorResult;
import lombok.Data;
import org.springframework.web.bind.annotation.ControllerAdvice;

/**
 * 前台登录异常处理
 */
@Data
public class RegException extends RuntimeException{
    private ErrorResult errorResult;

    public RegException(ErrorResult errorResult) {
        super(errorResult.getErrorMessage());
        this.errorResult=errorResult;
    }
}
